# -.- coding: utf-8 -.-

from django.conf.urls.defaults import *
from anima.views import *
#from anima.forms import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
                       #lavado de cara del sistema de registro de la aplicacion "registro" para que cree un jugador a la par que crea un usuario del sistema
                       #(r'^registro/registro/', 'registro.views.register',{'form_class':RoleandoRegistroBasicoForm}),
                        #(r'^registro/login/$', 'django.contrib.auth.views.login', {'template_name': 'registration/login.html'}),
                        #(r'^registro/logout/$', 'django.contrib.auth.views.logout_then_login'),
                        (r'^registro/', include('registration.backends.default.urls')),
                        (r'^gestor/', include('fichas.urls')),
                        (r'^perfil/', include('profiles.urls')),
                        (r'^partidas/', include('partidas.urls')),
                        (r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
                        url(r'^admin/', include(admin.site.urls)),

)

urlpatterns += patterns('anima.views',
                       url(r'^$', 'inicio', name='inicio'),
                       url(r'^inicial/$', 'inicial', name='inicial'),
)

#patrones EN DEBUG!! para cargar contenido media (subido por el usuario)
if settings.DEBUG:
    urlpatterns += patterns('',
        url(r'^site_media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
        }),
    )
